<m_include file="Public:head" />
<body>
<m_include file="Public:nav" />
<!-- <a href="{:U('/user','','')}" style="display:block; line-height:40px; text-align:center">返回用户中心</a> -->
<php>
	$status=array("-1"=>"<span class=\"t-c-g\">提交订单</span>","0"=>"<span class=\"t-c-g\">进行中</span>","1"=>"已回收");	
	$way=array("0"=>"上门回收","1"=>"邮寄回收");	
</php>

<div class="main">
	<div class="order_list"><volist name="list" id="vo">
		<ul>    	
	    	<li><em>订单号：</em>{$vo.id}</li>
	        <li><em>下单时间：</em>{$vo.ctime}</span></li>
	        <li><em>回收型号：</em>{$vo.pname}</li>
	        <li><em>回收价格：</em><span class="t-c-r">￥{$vo.price}</span></li>	       
	        <li><em>回收方式：</em>{$way[$vo['way']]} <if condition="$vo['status'] eq -1 "> - <span data-orderid="{$vo.id}" class="express t-c-b">填写运单号</span></if></li>
			<li><em>订单状态：</em>{$status[$vo['status']]}</li>
		</ul></volist>
	</div>
</div>
<m_include file="Public:foot" />
<m_include file="Public:script" />
<script>
$(document).on('touchstart','span.express',function(e){
	e.preventDefault();
	e.stopPropagation();	
	
	var t = $(this),oid = t.data('orderid');
	eform = '<form action="/user/express" method="post" class="express_form layer"><input type="hidden" name="orderid" value="'+oid+'" /><div class="line">\u9009\u62E9\u7269\u6D41\u516C\u53F8\uFF1A<select class="way" type="text" name="way"><option value="\u7533\u901A\u5FEB\u9012">\u7533\u901A\u5FEB\u9012</option><option value="\u987A\u4E30\u5FEB\u9012">\u987A\u4E30\u5FEB\u9012</option><option value="\u5706\u901A\u5FEB\u9012">\u5706\u901A\u5FEB\u9012</option><option value="\u97F5\u8FBE\u5FEB\u9012">\u97F5\u8FBE\u5FEB\u9012</option><option value="ems\u5FEB\u9012">ems\u5FEB\u9012</option><option value="\u4E2D\u901A\u5FEB\u9012">\u4E2D\u901A\u5FEB\u9012</option><option value="\u5B85\u6025\u9001">\u5B85\u6025\u9001</option></select><div><div class="line">\u586B\u5199\u8FD0\u5355\u53F7\uFF1A<input type="text" class="ipt_txt expresscode" name="expresscode" placeholder="\u586B\u5199\u8FD0\u5355\u53F7"  /></div><div class="line"><input type="submit" class="btn" value="\u63D0\u4EA4" /></div></form>';
	layer.open({
	    title: [
	        '填写运单信息'
	    ],
	    content: eform
	});	
});
$(document).on('submit','.express_form',function(e){
	e.preventDefault();
	var t = $(this),c = t.find('.expresscode');
	if(!confirm("确认提交?")) return;
	if($.trim(c.val()).length < 11) 
	{	
		m(c.focus()); return
	}
	$.post(t.attr('action'),t.serializeArray(),function(msg){
		if(msg.status == 1){
			location.reload();
		}
	}); 	
});

</script>
</body>
</html>
